$(function(){
	$(window).resize();
	
	$('.next_page a').click(function(e){
		e.preventDefault();
		
		var sectionId = $(this).attr("href");
		scrollToSection(sectionId);
	});
});

$(window).resize(function(){
	setSectionMinHeight();
});

function setSectionMinHeight(){
	var windowHeight = $(window).height();
	$('.wrapper section').css("min-height", windowHeight);
}

function scrollToSection(sectionId){
	$('html, body').stop().animate({
		scrollTop: $(sectionId).offset().top
	}, 1500);
}